<?php
define('DEBUG_ENABLED', 'on');
@ini_set('display_errors', DEBUG_ENABLED);
error_reporting(DEBUG_ENABLED ? E_ALL & !E_NOTICE & !E_STRICT : E_ERROR | E_PARSE);
date_default_timezone_set("Asia/Shanghai");

//runtime info
define('IN_AUTOSAVE',  true );
define('APP_ROOT',  dirname(__FILE__) );
define('SAVE_ROOT',  APP_ROOT.'/save' );
define('SAVE_TIME_FORMAT',  'U' ); //use timestmap now, once used "ymdHis" in older version

//fetch option
//define('FETCH_USER_AGENT','');
//define('FETCH_COOKIE','');

//save mode
define('MODE_MODIFIED', -1);
define('MODE_HOURLY',   1);
define('MODE_DAILYLY',  2);
define('MODE_WEEKLY',   3);
define('MODE_MONTHLY',  4);

//fetch result
define('FETCH_NOT_MODIFIED',  1);
define('FETCH_SUCCESS', 2);

define('FETCH_UNKONW_ERROR',  0);
define('FETCH_FAILED',  -1);
define('FETCH_NOT_SUPPORT',  -2);

if (!file_exists(APP_ROOT.'/install.lock'))
	header('Location: /install.php');

header('Content-type: text/html;charset=utf-8');
?>